import i18n from '../../../i18n';
export const ExperimentConstants = {

  EXPERIMENT_STATE_DRAFT: 'DRAFT',
  EXPERIMENT_STATE_READY: 'READY',
  EXPERIMENT_STATE_RUNNING: 'RUNNING',
  EXPERIMENT_STATE_SYNC: 'SYNC_WAIT_EDIT',

  EXPERIMENT_TASK_RESULT_SUCCESS: 'SUCCESS',
  EXPERIMENT_TASK_RESULT_FAILED: 'FAILED',
  EXPERIMENT_TASK_RESULT_REJECTED: 'REJECTED', // 丢弃
  EXPERIMENT_TASK_RESULT_ERROR: 'ERROR',
  EXPERIMENT_TASK_RESULT_STOPPED: 'STOPPED', // 主动停止

  EXPERIMENT_TASK_STATE_FINISHED: 'FINISHED',
  EXPERIMENT_TASK_STATE_RUNNING: 'RUNNING',
  EXPERIMENT_TASK_STATE_STOPPING: 'STOPPING',
  EXPERIMENT_TASK_STATE_READY: 'READY',

  EXPERIMENT_ACTIVITY_TASK_USER_CHECK_STATE_WAITING: 'USER_CHECK_STATE_WAITING',
  EXPERIMENT_ACTIVITY_TASK_USER_CHECK_STATE_PASSED: 'USER_CHECK_STATE_PASSED',
  EXPERIMENT_ACTIVITY_TASK_USER_CHECK_STATE_FAILED: 'USER_CHECK_STATE_FAILED',

  EXPERIMENT_RELATION_TYPE_EMERGENCY_SCENE: 'emergency_scene',
  EXPERIMENT_RELATION_TYPE_OWNER: 'owner',

  ERROR: i18n.t('Abnormal'),
  FAILED: i18n.t('Not as expected'),
  STOPPED: i18n.t('Interrupt'),
  SUCCESS: i18n.t('Success'),
  EXCEPTION: i18n.t('Abnormal'),
  TOTAL: i18n.t('Number of drills'),
};

export const NodeRunResult = {
  REJECTED: 'REJECTED',
  SUCCESS: 'SUCCESS',
  FAILED: [ 'FAILED', 'SOPPED_FAILED', 'ERROR', 'STOPPED' ],
};

export const NORMAL = -1;
export const OBSERVER = 0;
export const RECOVER = 1;
export const TASK = 2;
